type ratio = {num: int; denum: int};;
 
let add_ratio r1 r2 =
   {num = r1.num * r2.denum + r2.num * r1.denum;
    denum = r1.denum * r2.denum};;
 
let ( =|= ) r1 r2 =
  if r1.num = r2.num then r1.denum = r2.denum else false
;;

if (add_ratio {num=1; denum=3} {num=2; denum=5}) =|= {num = 11; denum = 15} then
  print_string "{num=1 ;demum=3} + {num=2;denum=5} = {num=11; denum=15},Yes!\n"
else
  assert false
;;

